package logger

import (
	"io"
	"log"
	"os"
)

var (
	Trace   *log.Logger // 记录所有日志
	Info    *log.Logger // 记录重要信息
	Warning *log.Logger // 记录警告信息
	Error   *log.Logger // 非常严重错误
)

func init() {
	Trace = log.New(io.Discard,
		log.Prefix()+"TRACE: ", log.Ldate|log.Ltime|log.Lshortfile)
	Info = log.New(os.Stdout,
		log.Prefix()+"INFO: ", log.Ldate|log.Ltime|log.Lshortfile)
	Warning = log.New(os.Stdout,
		log.Prefix()+"WARNING: ", log.Ldate|log.Ltime|log.Lshortfile)
	Error = log.New(os.Stderr,
		log.Prefix()+"ERROR: ", log.Ldate|log.Ltime|log.Lshortfile)
}
